---
title: "corrections_merged"
output: 
  html_document:
    toc: true
    toc_float: true
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

```{r packages, message=FALSE,include=FALSE}
library(rio)
library(dplyr)
library(reshape2)
library(lme4)
library(jtools)
library(ggeffects)
library(ggplot2)
library(patchwork)
```

```{r data,message=FALSE,include=FALSE}
corrections_uk <- import("uk.sav", setclass="tibble")
corrections_brazil <- import("brazil.sav", setclass="tibble")
corrections_brazil <- corrections_brazil %>%
  rename(attentioncheck1= attention_check1)

corrections_india <- import("india.sav", setclass="tibble")

corrections_uk$country <- "UK"
corrections_brazil$country <- "Brazil"
corrections_india$country <- "India"

corrections_merged <- bind_rows(corrections_uk, corrections_brazil, corrections_india)

corrections_merged <- corrections_merged %>%
  filter(consent==1) %>%
  filter(debrief_1 != "NA")

#library(haven)
#data <- read_spss("brazil.sav")

UK = filter(corrections_merged, country =="UK")
median(UK$age) #median: 45-55
table(UK$age) #mode: over 55
median(UK$education) # median: post-secondary
table(UK$education) # lower secondary  
table(UK$gender) #520 women

Bra = filter(corrections_merged, country =="Brazil")
median(Bra$age) #median: 35-44
table(Bra$age) #mode: 25-34
median(Bra$education) # median: Short-cycle tertiary education 
table(Bra$education) # mode: post-secondary
table(Bra$gender) #550 women

Ind = filter(corrections_merged, country =="India")
median(Ind$age) #median: 25-34
table(Ind$age) #mode: 35-44
median(Ind$education) # median: Short-cycle tertiary education 
table(Ind$education) # Short-cycle tertiary education  
table(Ind$gender) #460 women


table(Ind$attentioncheck1)
table(Ind$attentioncheck2)

sum(Ind$attentioncheck1 == 0 | Ind$attentioncheck2 == 0, na.rm = TRUE)

table(Bra$attentioncheck1)
table(Bra$attentioncheck2)

sum(Bra$attentioncheck1 == 0  | Bra$attentioncheck2 == 0, na.rm = TRUE)

table(UK$attentioncheck1)
table(UK$attentioncheck2)

sum(UK$attentioncheck1 == 0  | UK$attentioncheck2 == 0, na.rm = TRUE)

```

```{r recoding, message=FALSE,include=FALSE}
corrections_merged <- corrections_merged %>%
  mutate(false_1_accuracy = ifelse(country == "UK", coalesce(A1_dv_accurate_link,A1_dv_accurate_nolink,A1_dv_accurate_control),
                            ifelse(country == "Brazil", coalesce(A6_dv_accurate_link,A6_dv_accurate_nolink,A6_dv_accurate_nocorrec),
                                                     coalesce(A7_dv_accurate_link,A7_dv_accurate_nolink,A9_dv_accurate_nocorrec)))) %>%
  mutate(false_2_accuracy = ifelse(country == "UK", coalesce(A2_dv_accurate_link,A2_dv_accurate_nolink,A2_dv_accurate_control),
                            ifelse(country == "Brazil", coalesce(A7_dv_accurate_link,A7_dv_accurate_nolink,A3_dv_accurate_nocorrec),
                                                     coalesce(A3_dv_accurate_link,A3_dv_accurate_nolink,A3_dv_accurate_nocorrec)))) %>%  
  mutate(false_3_accuracy = ifelse(country == "UK", coalesce(A3_dv_accurate_link,A3_dv_accurate_nolink,A3_dv_accurate_control),
                            ifelse(country == "Brazil", coalesce(A8_dv_accurate_link,A8_dv_accurate_nolink,A8_dv_accurate_nocorrec),
                                                     coalesce(A1_dv_accurate_link,A1_dv_accurate_nolink,A1_dv_accurate_nocorrec)))) %>%
  mutate(false_4_accuracy = ifelse(country == "UK", coalesce(A4_dv_accurate_link,A4_dv_accurate_nolink,A4_dv_accurate_control),
                            ifelse(country == "Brazil", coalesce(A9_dv_accurate_link,A9_dv_accurate_nolink,A1_dv_accurate_nocorrec),
                                                     coalesce(A5_dv_accurate_link,A5_dv_accurate_nolink,A5_dv_accurate_nocorrec)))) %>% 
  
  mutate(uncorrected_1_accuracy = ifelse(country == "UK", coalesce(A10_dv_accurate_link,A10_dv_accurate_nolink,A10_dv_accurate_control),
                                ifelse(country == "Brazil", coalesce(A10_dv_accurate_link,A10_dv_accurate_nolink,A9_dv_accurate_nocorrec),
                                                     coalesce(A8_dv_accurate_link,A8_dv_accurate_nolink,A10_dv_accurate_nocorrec)))) %>% 
  mutate(uncorrected_2_accuracy = ifelse(country == "UK", coalesce(A11_dv_accurate_link,A11_dv_accurate_nolink,A11_dv_accurate_control),
                                ifelse(country == "Brazil", coalesce(A11_dv_accurate_link,A12_dv_accurate_nolink,A11_dv_accurate_nocorrec),
                                                     coalesce(A9_dv_accurate_link,A9_dv_accurate_nolink,A12_dv_accurate_nocorrec)))) %>% 

  mutate(real_1_accuracy = ifelse(country == "UK", coalesce(A7_dv_accurate_link,A7_dv_accurate_nolink,A7_dv_accurate_control),
                           ifelse(country == "Brazil", coalesce(A2_dv_accurate_link,A2_dv_accurate_nolink,A2_dv_accurate_nocorrec),
                                                     coalesce(A2_dv_accurate_link,A2_dv_accurate_nolink,A2_dv_accurate_nocorrec)))) %>%   
  mutate(real_2_accuracy = ifelse(country == "UK", coalesce(A8_dv_accurate_link,A8_dv_accurate_nolink,A8_dv_accurate_control),
                           ifelse(country == "Brazil", coalesce(A4_dv_accurate_link,A4_dv_accurate_nolink,A4_dv_accurate_nocorrec),
                                                     coalesce(A4_dv_accurate_link,A4_dv_accurate_nolink,A4_dv_accurate_nocorrec)))) %>% 
  mutate(real_3_accuracy = ifelse(country == "UK", coalesce(A9_dv_accurate_link,A9_dv_accurate_nolink,A9_dv_accurate_control),
                           ifelse(country == "Brazil", coalesce(A5_dv_accurate_link,A5_dv_accurate_nolink,A5_dv_accurate_nocorrec),
                                                      coalesce(A6_dv_accurate_link,A6_dv_accurate_nolink,A6_dv_accurate_nocorrec))))

corrections_merged <- corrections_merged %>%
  mutate(false_1_sharing = ifelse(country == "UK", coalesce(A1_dv_share_link,A1_dv_share_nolink,A1_dv_share_control),
                            ifelse(country == "Brazil", coalesce(A6_dv_share_link,A6_dv_share_nolink,A6_dv_share_nocorrec),
                                                     coalesce(A7_dv_share_link,A7_dv_share_nolink,A9_dv_share_nocorrec)))) %>%
  mutate(false_2_sharing = ifelse(country == "UK", coalesce(A2_dv_share_link,A2_dv_share_nolink,A2_dv_share_control),
                            ifelse(country == "Brazil", coalesce(A7_dv_share_link,A7_dv_share_nolink,A3_dv_share_nocorrec),
                                                     coalesce(A3_dv_share_link,A3_dv_share_nolink,A3_dv_share_nocorrec)))) %>%  
  mutate(false_3_sharing = ifelse(country == "UK", coalesce(A3_dv_share_link,A3_dv_share_nolink,A3_dv_share_control),
                            ifelse(country == "Brazil", coalesce(A8_dv_share_link,A8_dv_share_nolink,A8_dv_share_nocorrec),
                                                     coalesce(A1_dv_share_link,A1_dv_share_nolink,A1_dv_share_nocorrec)))) %>%
  mutate(false_4_sharing = ifelse(country == "UK", coalesce(A4_dv_share_link,A4_dv_share_nolink,A4_dv_share_control),
                            ifelse(country == "Brazil", coalesce(A9_dv_share_link,A9_dv_share_nolink,A1_dv_share_nocorrec),
                                                     coalesce(A5_dv_share_link,A5_dv_share_nolink,A5_dv_share_nocorrec)))) %>% 
  
  mutate(uncorrected_1_sharing = ifelse(country == "UK", coalesce(A10_dv_share_link,A10_dv_share_nolink,A10_dv_share_control),
                                ifelse(country == "Brazil", coalesce(A10_dv_share_link,A10_dv_share_nolink,A9_dv_share_nocorrec),
                                                     coalesce(A8_dv_share_link,A8_dv_share_nolink,A10_dv_share_nocorrec)))) %>% 
  mutate(uncorrected_2_sharing = ifelse(country == "UK", coalesce(A11_dv_share_link,A11_dv_share_nolink,A11_dv_share_control),
                                ifelse(country == "Brazil", coalesce(A11_dv_share_link,A12_dv_share_nolink,A11_dv_share_nocorrec),
                                                     coalesce(A9_dv_share_link,A9_dv_share_nolink,A12_dv_share_nocorrec)))) %>% 

  mutate(real_1_sharing = ifelse(country == "UK", coalesce(A7_dv_share_link,A7_dv_share_nolink,A7_dv_share_control),
                           ifelse(country == "Brazil", coalesce(A2_dv_share_link,A2_dv_share_nolink,A2_dv_share_nocorrec),
                                                     coalesce(A2_dv_share_link,A2_dv_share_nolink,A2_dv_share_nocorrec)))) %>%   
  mutate(real_2_sharing = ifelse(country == "UK", coalesce(A8_dv_share_link,A8_dv_share_nolink,A8_dv_share_control),
                           ifelse(country == "Brazil", coalesce(A4_dv_share_link,A4_dv_share_nolink,A4_dv_share_nocorrec),
                                                     coalesce(A4_dv_share_link,A4_dv_share_nolink,A4_dv_share_nocorrec)))) %>% 
  mutate(real_3_sharing = ifelse(country == "UK", coalesce(A9_dv_share_link,A9_dv_share_nolink,A9_dv_share_control),
                           ifelse(country == "Brazil", coalesce(A5_dv_share_link,A5_dv_share_nolink,A5_dv_share_nocorrec),
                                                     coalesce(A6_dv_share_link,A6_dv_share_nolink,A6_dv_share_nocorrec))))

corrections_merged$country <- factor(corrections_merged$country)

corrections_merged$condition[corrections_merged$condition=="correction_link"] <- "link"
corrections_merged$condition[corrections_merged$condition=="correction_nolink" | corrections_merged$condition=="nolink"] <- "correction"
corrections_merged$condition <- factor(corrections_merged$condition)

corrections_merged$consp_mean <- (corrections_merged$consp_id1 + corrections_merged$consp_id2 + corrections_merged$consp_id3 + corrections_merged$consp_id4)/4
```

```{r reshaping,include=FALSE}
names(corrections_merged)[names(corrections_merged) == "covid_trust_1"] <- "Trust_Scientist"
names(corrections_merged)[names(corrections_merged) == "covid_trust_2"] <- "Trust_Ordinary_ppl"
names(corrections_merged)[names(corrections_merged) == "covid_trust_5"] <- "Trust_SM"
names(corrections_merged)[names(corrections_merged) == "covid_trust_3"] <- "Trust_News"

corrections_accuracy_long <- melt(corrections_merged, id.vars = c("ResponseId", "condition", "country", "consp_mean","Trust_SM","Trust_News","Trust_Scientist","Trust_Ordinary_ppl","age","gender","education"), 
              measure.vars = c("false_1_accuracy", "false_2_accuracy", "false_3_accuracy", "false_4_accuracy"), 
              variable.name = "post", 
              value.name="accuracy")

corrections_sharing_long <- melt(corrections_merged, id.vars = c("ResponseId", "condition", "country", "consp_mean","Trust_SM","Trust_News","Trust_Scientist","Trust_Ordinary_ppl","age","gender","education"), 
              measure.vars = c("false_1_sharing", "false_2_sharing", "false_3_sharing", "false_4_sharing"), 
              variable.name = "post", 
              value.name="sharing")

corrections_all_long <- melt(corrections_merged, id.vars = c("ResponseId", "condition", "country", "consp_mean","Trust_SM","Trust_News","Trust_Scientist","Trust_Ordinary_ppl","age","gender","education"), 
              measure.vars = c("false_1_sharing", "false_2_sharing", "false_3_sharing", "false_4_sharing","false_1_accuracy", "false_2_accuracy", "false_3_accuracy", "false_4_accuracy"), 
              variable.name = "post", 
              value.name="DV")
```

## Hypotheses

## H1a
### Models

```{r h1a_model}
h1a_all <- lmer(DV ~ condition + country + (1|ResponseId)+(1|post:country), data=corrections_all_long)
summ(h1a_all, digits=3, confint=T)

h1a_uk <- lmer(accuracy ~ condition + post + (1|ResponseId), data=subset(corrections_accuracy_long, country=="UK"))
summ(h1a_uk, digits=3, confint =T)

model_summary <- summary(h1a_uk)
coefs <- fixef(h1a_uk)
percent_increase <- (coefs / coefs[1] - 1) * 100
percent_increase # percent increase 

h1a_brazil <- lmer(accuracy ~ condition +  post +(1|ResponseId), data=subset(corrections_accuracy_long, country=="Brazil"))
summ(h1a_brazil, digits=3, confint =T)
model_summary <- summary(h1a_brazil)

coefs <- fixef(h1a_brazil)
percent_increase <- (coefs / coefs[1] - 1) * 100
percent_increase

h1a_india <- lmer(accuracy ~ condition + post + (1 | ResponseId), data=subset(corrections_accuracy_long, country=="India"))
summ(h1a_india, digits=3, confint =T)
model_summary <- summary(h1a_india)

coefs <- fixef(h1a_india)
percent_increase <- (coefs / coefs[1] - 1) * 100
percent_increase

```

### Plots

```{r h1a_results}
h1a_uk_results <- ggpredict(h1a_uk, terms = c("condition"))
h1a_brazil_results <- ggpredict(h1a_brazil, terms = c("condition"))
h1a_india_results <- ggpredict(h1a_india, terms = c("condition"))
```

```{r h1a_plots}
h1a_uk_plot <- ggplot(h1a_uk_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction","Correction\n + link")) +
    scale_y_continuous(limits = c(0,2), breaks = c(0,1,2),expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate")) +
  ylab("Accuracy") +
  xlab("") +
  ggtitle("UK") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none",
        plot.title = element_text(hjust = 0.5),
        axis.text.x = element_text(size=11),
        axis.text.y = element_text(size=10),
        axis.title.y = element_text(size=15,face="bold"),
        title = element_text(size=12,face="bold"))

h1a_brazil_plot <- ggplot(h1a_brazil_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
  scale_x_discrete(labels=c("Control","Correction","Correction\n + link")) +
  scale_y_continuous(limits = c(0,2), breaks = c(0,1,2),expand = c(0,0)) +
  ylab("Accuracy") +
  xlab("Condition") +
  ggtitle("Brazil") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.y=element_blank(),
        axis.title.x=element_text(size=14,face="bold"),
        axis.text.y=element_blank(),
        axis.text.x = element_text(size=11),
        legend.position = "none",
        plot.title = element_text(hjust = 0.5),
        title = element_text(size=12,face="bold"))

h1a_india_plot <- ggplot(h1a_india_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
  scale_x_discrete(labels=c("Control","Correction","Correction\n + link")) +
  scale_y_continuous(limits = c(0,2),breaks = c(0,1,2), expand = c(0,0)) +
  ylab("Accuracy") +
  xlab("") +
  ggtitle("India") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.y=element_blank(),
        axis.text.y=element_blank(),
        axis.text.x = element_text(size=11),
        axis.title.x=element_blank(),
        legend.position = "none",
        plot.title = element_text(hjust = 0.5),
        title = element_text(size=12,face="bold"))

```

## H1b
### Models

```{r h1b_model}
h1b_all <- lmer(sharing ~ condition + (1 | ResponseId) +(1|post:country), data=corrections_sharing_long)
summ(h1b_all, digits=3, confint =T)

h1b_uk <- lmer(sharing ~ condition + post + (1 | ResponseId), data=subset(corrections_sharing_long, country=="UK"))
summ(h1b_uk, digits=3, confint =T)

model_summary <- summary(h1b_uk)
coefs <- fixef(h1b_uk)
percent_increase <- (coefs / coefs[1] - 1) * 100
percent_increase

h1b_brazil <- lmer(sharing ~ condition + post + (1 | ResponseId), data=subset(corrections_sharing_long, country=="Brazil"))
summ(h1b_brazil, digits=3, confint =T)

model_summary <- summary(h1b_brazil)
coefs <- fixef(h1b_brazil)
percent_increase <- (coefs / coefs[1] - 1) * 100
percent_increase

h1b_india <- lmer(sharing ~ condition + post + (1 | ResponseId), data=subset(corrections_sharing_long, country=="India"))
summ(h1b_india, digits=3, confint =T)

model_summary <- summary(h1b_india)
coefs <- fixef(h1b_india)
percent_increase <- (coefs / coefs[1] - 1) * 100
percent_increase

```

### Plots


```{r PLOTTHEMALL}
library(dplyr)
library(jtools)
library(ggplot2)

p <- plot_summs(
                h1a_uk,
                h1a_brazil,
                h1a_india,
                h1a_all,
                
                h1b_uk,
                h1b_brazil,
                h1b_india,
                h1b_all,
                coefs = c("1" = "conditioncorrection",
                          "2" = "conditionlink"),
                legend.title = "", colors = "Rainbow",
                scale = T, robust = T) +
  theme(axis.text.y = element_text(face = "bold", size = 11))
p
df <- p$data
df <- df %>%
  mutate(Country = rep(c("UK","UK", "Brazil","Brazil","India","India","Combined","Combined",
                         "UK","UK", "Brazil","Brazil","India","India","Combined","Combined")))%>%
  mutate(DV = rep(c("Accuracy","Accuracy","Accuracy","Accuracy",
                    "Accuracy","Accuracy","Accuracy", "Accuracy",
                    "Sharing","Sharing","Sharing","Sharing",
                    "Sharing","Sharing","Sharing","Sharing")))%>%
  mutate(Condition = rep(c("Correction","Correction + Link","Correction", "Correction + Link",
                           "Correction","Correction + Link","Correction", "Correction + Link",
                    "Correction","Correction + Link","Correction", "Correction + Link", 
                    "Correction","Correction + Link","Correction", "Correction + Link")))%>%
  mutate(DV = factor(DV, levels = c("Sharing","Accuracy")))%>%
  mutate(Country = factor(Country, levels = c("Combined","India","Brazil","UK")))%>%
  mutate(Condition = factor(Condition, levels = c("Correction + Link","Correction")))

effi_effects_grouped <- ggplot(data = df) +
  aes(x = estimate, y = Condition, xmin = conf.low, xmax = conf.high, color = Country, shape = DV) +
  geom_vline(xintercept = 0, lty = 1, lwd = 0.2) +
  geom_pointrange(position = position_dodge2(0.6)) +
  labs(x = "PASSED", y = "") +
  theme_light() +
  theme(strip.background = element_blank(), strip.text = element_text(color = "black", size = 15, face = "italic"), axis.text.y = element_text(size = 12))+
  scale_shape_manual(
    values = c("Accuracy" = 15, "Sharing" = 17),
    breaks = c("Accuracy", "Sharing")) +
  scale_color_manual(
    values = c("UK" = "royalblue2", "Brazil" = "#009C3B","India" = "#FF671F","Combined" = "#000000"),
    breaks = c("UK", "Brazil","India","Combined"),
    labels = c("UK", "Brazil","India","Combined"),
    guide = guide_legend(override.aes = list(shape = 16,linetype = 0, size = 1.4, alpha = 0.5)))+
  scale_alpha_continuous(range = c(0.4, 1),guide = "none") # Adjust transparency

effi_effects_grouped
ggsave("Fig_everything_results_CHECK_YES.pdf", effi_effects_grouped, width = 6, height = 4)


```





```{r h1b_results}
h1b_uk_results <- ggpredict(h1b_uk, terms = c("condition"))
h1b_brazil_results <- ggpredict(h1b_brazil, terms = c("condition"))
h1b_india_results <- ggpredict(h1b_india, terms = c("condition"))
```

```{r h1b_plots}
h1b_uk_plot <- ggplot(h1b_uk_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction","Correction\n + link")) +
    scale_y_continuous(limits = c(0,2), breaks = c(0,1,2), expand = c(0,0), labels=c("Not at all\n likely", "Not very\n likely", "Somewhat\n likely")) +
  ylab("Likelihood of sharing") +
  xlab("") +
  ggtitle("UK") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none",
        plot.title = element_text(hjust = 0.5),
        axis.text.x = element_text(size=11),
        axis.text.y = element_text(size=10),
        axis.title.y = element_text(size=15,face="bold"),
        title = element_text(size=12,face="bold"))

h1b_brazil_plot <- ggplot(h1b_brazil_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
  scale_x_discrete(labels=c("Control","Correction","Correction\n + link")) +
  scale_y_continuous(limits = c(0,2),breaks = c(0,1,2),expand = c(0,0)) +
  ylab("Accuracy") +
  xlab("Condition") +
  ggtitle("Brazil") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.y=element_blank(),
        axis.title.x=element_text(size=14,face="bold"),
        axis.text.y=element_blank(),
        axis.text.x = element_text(size=11),
        legend.position = "none",
        plot.title = element_text(hjust = 0.5),
        title = element_text(size=12,face="bold"))

h1b_india_plot <- ggplot(h1b_india_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
  scale_x_discrete(labels=c("Control","Correction","Correction\n + link")) +
  scale_y_continuous(limits = c(0,2), breaks = c(0,1,2),expand = c(0,0)) +
  ylab("Accuracy") +
  xlab("") +
  ggtitle("India") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.y=element_blank(),
        axis.text.y=element_blank(),
        axis.text.x = element_text(size=11),
        axis.title.x=element_blank(),
        legend.position = "none",
        plot.title = element_text(hjust = 0.5),
        title = element_text(size=12,face="bold"))


```


## H2a

### Models
We can formally test this simply by changing the reference category in the models from H1a.

```{r h2a_model}
h2a_all <- lmer(accuracy ~ relevel(condition, ref = "correction") + (1|post:country) +(1 | ResponseId), data=subset(corrections_accuracy_long))
summ(h2a_all, digits=3, confint =T)

coefs <- fixef(h2a_all)
percent_increase <- (coefs / coefs[1] - 1) * 100
percent_increase

h2a_uk <- lmer(accuracy ~ relevel(condition, ref = "correction") + post + (1 | ResponseId), data=subset(corrections_accuracy_long, country=="UK"))
summ(h2a_uk, digits=3, confint =T)

h2a_brazil <- lmer(accuracy ~ relevel(condition, ref = "correction") + post + (1 | ResponseId), data=subset(corrections_accuracy_long, country=="Brazil"))
summ(h2a_brazil, digits=3, confint =T)

h2a_india <- lmer(accuracy ~ relevel(condition, ref = "correction") + post + (1 | ResponseId), data=subset(corrections_accuracy_long, country=="India"))
summ(h2a_india, digits=3, confint =T)
```

## H2b

### Models

We can formally test this simply by changing the reference category in the models from H1b.

```{r h2b_model}
h2b_all <- lmer(sharing ~ relevel(condition, ref = "correction") + +(1|post:country)+ (1 | ResponseId), data=subset(corrections_sharing_long))
summ(h2b_all, digits=3, confint =T)

coefs <- fixef(h2b_all)
percent_increase <- (coefs / coefs[1] - 1) * 100
percent_increase

coefs <- fixef(h2b_all)
pp_effects <- (coefs / 3) * 100
pp_effects

h2b_uk <- lmer(sharing ~ relevel(condition, ref = "correction") + post + (1 | ResponseId), data=subset(corrections_sharing_long, country=="UK"))
summ(h2b_uk, digits=3, confint =T)

h2b_brazil <- lmer(sharing ~ relevel(condition, ref = "correction") + post + (1 | ResponseId), data=subset(corrections_sharing_long, country=="Brazil"))
summ(h2b_brazil, digits=3, confint =T)

h2b_india <- lmer(sharing ~ relevel(condition, ref = "correction") + post + (1 | ResponseId), data=subset(corrections_sharing_long, country=="India"))
summ(h2b_india, digits=3, confint =T)
```

## RQ2a

### Models

```{r rq2a_model}
rq2a_all <- lmer(accuracy ~ condition*consp_mean + +(1|post:country)+ (1 | ResponseId), data=corrections_accuracy_long)
summ(rq2a_all)
confint(rq2a_all)

rq2a_uk <- lmer(accuracy ~ condition*consp_mean + post + (1 | ResponseId) , data=subset(corrections_accuracy_long, country=="UK"))
summ(rq2a_uk)
confint(rq2a_uk)
rq2a_brazil <- lmer(accuracy ~ condition*consp_mean + post + (1 | ResponseId), data=subset(corrections_accuracy_long, country=="Brazil"))
summ(rq2a_brazil)
confint(rq2a_brazil)
rq2a_india <- lmer(accuracy ~ condition*consp_mean + post + (1 | ResponseId), data=subset(corrections_accuracy_long, country=="India"))
summ(rq2a_india)
confint(rq2a_india)
```

### Plots

```{r rq2a_results}
rq2a_uk_results <- ggpredict(rq2a_uk, terms = c("condition", "consp_mean"))
rq2a_brazil_results <- ggpredict(rq2a_brazil, terms = c("condition", "consp_mean"))
rq2a_india_results <- ggpredict(rq2a_india, terms = c("condition", "consp_mean"))
```


```{r rq2a_plots}
rq2a_uk_plot <- ggplot(rq2a_uk_results, aes(x, predicted, group=group)) +
   # geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
    ylab("accuracy") +
   #xlab("Condition") +
    ggtitle("UK") +
    scale_color_manual("Conspiracy\nideation", values=c("#99a9db", "#60719f", "#0D2042"), labels=c("Low", "Medium", "High")) +
    theme_classic() +
    theme(axis.title.x=element_blank())

rq2a_brazil_plot <- ggplot(rq2a_brazil_results, aes(x, predicted, group=group)) +
    #geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
    #ylab("sharing") +
    xlab("Condition") +
    ggtitle("Brazil") +
    scale_color_manual("Conspiracy\nideation", values=c("#99a9db", "#60719f", "#0D2042"), labels=c("Low", "Medium", "High")) +
    theme_classic() +
    theme(axis.title.y=element_blank(),
          axis.text.y=element_blank())

rq2a_india_plot <- ggplot(rq2a_india_results, aes(x, predicted, group=group)) +
    #geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
    ylab("accuracy") +
    xlab("Condition") +
    ggtitle("India") +
    scale_color_manual("Conspiracy\nideation", values=c("#99a9db", "#60719f", "#0D2042"), labels=c("Low", "Medium", "High")) +
    theme_classic() +
    theme(axis.title.y=element_blank(),
          axis.text.y=element_blank(),
          axis.title.x=element_blank())

library("patchwork")
library("ggplot2")
final_plot <- rq2a_uk_plot + rq2a_brazil_plot + rq2a_india_plot + plot_layout(guides = 'collect')
print(final_plot)

ggsave("Conspi.pdf", final_plot, width = 7, height = 5)

```



## RQ2b

### Models

```{r rq2b_model}
rq2b_all <- lmer(sharing ~ condition*consp_mean + +(1|post:country)+(1 | ResponseId) , data=subset(corrections_sharing_long))
summ(rq2b_all, digits=3, confint =T)

rq2b_uk <- lmer(sharing ~ condition*consp_mean + post + (1 | ResponseId) , data=subset(corrections_sharing_long, country=="UK"))
summ(rq2b_uk, digits=3, confint =T)

rq2b_brazil <- lmer(sharing ~ condition*consp_mean + post + (1 | ResponseId), data=subset(corrections_sharing_long, country=="Brazil"))
summ(rq2b_brazil, digits=3, confint =T)

rq2b_india <- lmer(sharing ~ condition*consp_mean + post + (1 | ResponseId), data=subset(corrections_sharing_long, country=="India"))
summ(rq2b_india, digits=3, confint =T)
```

### Plots

```{r rq2b_results}
rq2b_uk_results <- ggpredict(rq2b_uk, terms = c("condition", "consp_mean"))
rq2b_brazil_results <- ggpredict(rq2b_brazil, terms = c("condition", "consp_mean"))
rq2b_india_results <- ggpredict(rq2b_india, terms = c("condition", "consp_mean"))
```


```{r rq2b_plots}
rq2b_uk_plot <- ggplot(rq2b_uk_results, aes(x, predicted, group=group)) +
   # geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n likely", "Not very\n likely", "Somewhat\n likely", "Very\n likely")) +
    ylab("Sharing") +
   #xlab("Condition") +
    ggtitle("UK") +
    scale_color_manual("Conspiracy\nideation", values=c("#99a9db", "#60719f", "#0D2042"), labels=c("Low", "Medium", "High")) +
    theme_classic() +
    theme(axis.title.x=element_blank())

rq2b_brazil_plot <- ggplot(rq2b_brazil_results, aes(x, predicted, group=group)) +
   # geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
    #ylab("sharing") +
    xlab("Condition") +
    ggtitle("Brazil") +
    scale_color_manual("Conspiracy\nideation", values=c("#99a9db", "#60719f", "#0D2042"), labels=c("Low", "Medium", "High")) +
    theme_classic() +
    theme(axis.title.y=element_blank(),
          axis.text.y=element_blank())

rq2b_india_plot <- ggplot(rq2b_india_results, aes(x, predicted, group=group)) +
   # geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
    ylab("sharing") +
    xlab("Condition") +
    ggtitle("India") +
    scale_color_manual("Conspiracy\nideation", values=c("#99a9db", "#60719f", "#0D2042"), labels=c("Low", "Medium", "High")) +
    theme_classic() +
    theme(axis.title.y=element_blank(),
          axis.text.y=element_blank(),
          axis.title.x=element_blank())

final_plot <-rq2b_uk_plot + rq2b_brazil_plot + rq2b_india_plot + plot_layout(guides = 'collect')
print(final_plot)

ggsave("ConspiSha.pdf", final_plot, width = 7, height = 5)

```

## RQ3a
### Models
```{r rq_3a}
# Is the effect of correction moderated by trust in Social Media?
rq3a_all <- lmer(accuracy ~ condition*Trust_SM +(1|post:country)+ (1 | ResponseId) , data=subset(corrections_accuracy_long))
summ(rq3a_all, digits=3, confint =T)


rq3a_uk <- lmer(accuracy ~ condition*Trust_SM + post + (1 | ResponseId) , data=subset(corrections_accuracy_long, country=="UK"))
summ(rq3a_uk, digits=3, confint =T)

rq3a_brazil <- lmer(accuracy ~ condition*Trust_SM + post + (1 | ResponseId), data=subset(corrections_accuracy_long, country=="Brazil"))
summ(rq3a_brazil, digits=3, confint =T)

rq3a_india <- lmer(accuracy ~ condition*Trust_SM + post + (1 | ResponseId), data=subset(corrections_accuracy_long, country=="India"))
summ(rq3a_india, digits=3, confint =T)

```

### Plots

```{r rq3a_plots}
rq3a_uk_results <- ggpredict(rq3a_uk, terms = c("condition", "Trust_SM"))
rq3a_india_results <- ggpredict(rq3a_india, terms = c("condition", "Trust_SM"))
rq3a_brazil_results <- ggpredict(rq3a_brazil, terms = c("condition", "Trust_SM"))

rq3a_uk_plot <- ggplot(rq3a_uk_results, aes(x, predicted, group=group)) +
   # geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
    ylab("accuracy") +
   #xlab("Condition") +
    ggtitle("UK") +
      scale_color_manual("Trust in social media", 
                      values = c("#d7eefd", "#99c8ff", "#55a7ff", "#1f86ff", "#0d42ff"), 
                      labels = c("Not at all", "A little", "A moderate amount", "A lot", "A great deal"))+
    theme_classic() +
    theme(axis.title.x=element_blank())

rq3a_brazil_plot <- ggplot(rq3a_brazil_results, aes(x, predicted, group=group)) +
    #geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
    #ylab("sharing") +
    xlab("Condition") +
    ggtitle("Brazil") +
      scale_color_manual("Trust in social media", 
                      values = c("#d7eefd", "#99c8ff", "#55a7ff", "#1f86ff", "#0d42ff"), 
                      labels = c("Not at all", "A little", "A moderate amount", "A lot", "A great deal"))+
    theme_classic() +
    theme(axis.title.y=element_blank(),
          axis.text.y=element_blank())

rq3a_india_plot <- ggplot(rq3a_india_results, aes(x, predicted, group=group)) +
    #geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
    ylab("accuracy") +
    xlab("Condition") +
    ggtitle("India") +
      scale_color_manual("Trust in social media", 
                      values = c("#d7eefd", "#99c8ff", "#55a7ff", "#1f86ff", "#0d42ff"), 
                      labels = c("Not at all", "A little", "A moderate amount", "A lot", "A great deal"))+
    theme_classic() +
    theme(axis.title.y=element_blank(),
          axis.text.y=element_blank(),
          axis.title.x=element_blank())

final_plot <-rq3a_uk_plot + rq3a_brazil_plot + rq3a_india_plot + plot_layout(guides = 'collect')
print(final_plot)

ggsave("SMAcc.pdf", final_plot, width = 7, height = 5)

```


## RQ3b
### Models
```{r rq3b}
# Is the effect of correction moderated by trust in Social Media?
rq3b_all <- lmer(sharing ~ condition*Trust_SM + (1|post:country) + (1 | ResponseId) , data=subset(corrections_sharing_long))
summ(rq3b_all, digits=3, confint =T)

rq3b_uk <- lmer(sharing ~ condition*Trust_SM + post + (1 | ResponseId) , data=subset(corrections_sharing_long, country=="UK"))
summ(rq3b_uk, digits=3, confint =T)

rq3b_brazil <- lmer(sharing ~ condition*Trust_SM + post + (1 | ResponseId), data=subset(corrections_sharing_long, country=="Brazil"))
summ(rq3b_brazil, digits=3, confint =T)

rq3b_india <- lmer(sharing ~ condition*Trust_SM + post + (1 | ResponseId), data=subset(corrections_sharing_long, country=="India"))
summ(rq3b_india, digits=3, confint =T)

```

### Plots

```{r rq3b_plots}
rq3b_uk_results <- ggpredict(rq3b_uk, terms = c("condition", "Trust_SM"))
rq3b_india_results <- ggpredict(rq3b_india, terms = c("condition", "Trust_SM"))
rq3b_brazil_results <- ggpredict(rq3b_brazil, terms = c("condition", "Trust_SM"))

rq3b_uk_plot <- ggplot(rq3b_uk_results, aes(x, predicted, group=group)) +
   # geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n likely", "Not very\n likely", "Somewhat\n likely", "Very\n likely")) +
    ylab("Sharing") +
   #xlab("Condition") +
    ggtitle("UK") +
      scale_color_manual("Trust in social media", 
                      values = c("#d7eefd", "#99c8ff", "#55a7ff", "#1f86ff", "#0d42ff"), 
                      labels = c("Not at all", "A little", "A moderate amount", "A lot", "A great deal"))+
    theme_classic() +
    theme(axis.title.x=element_blank())

rq3b_brazil_plot <- ggplot(rq3b_brazil_results, aes(x, predicted, group=group)) +
    #geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
    #ylab("sharing") +
    xlab("Condition") +
    ggtitle("Brazil") +
      scale_color_manual("Trust in social media", 
                      values = c("#d7eefd", "#99c8ff", "#55a7ff", "#1f86ff", "#0d42ff"), 
                      labels = c("Not at all", "A little", "A moderate amount", "A lot", "A great deal"))+
    theme_classic() +
    theme(axis.title.y=element_blank(),
          axis.text.y=element_blank())

rq3b_india_plot <- ggplot(rq3b_india_results, aes(x, predicted, group=group)) +
    #geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
    ylab("Sharing") +
    xlab("Condition") +
    ggtitle("India") +
      scale_color_manual("Trust in social media", 
                      values = c("#d7eefd", "#99c8ff", "#55a7ff", "#1f86ff", "#0d42ff"), 
                      labels = c("Not at all", "A little", "A moderate amount", "A lot", "A great deal"))+
    theme_classic() +
    theme(axis.title.y=element_blank(),
          axis.text.y=element_blank(),
          axis.title.x=element_blank())



final_plot <-rq3b_uk_plot + rq3b_brazil_plot + rq3b_india_plot + plot_layout(guides = 'collect')
print(final_plot)

ggsave("SMASha.pdf", final_plot, width = 7, height = 5)

```




## RQ4a
### Models
```{r rq_4a}

rq4a_all <- lmer(accuracy ~ condition*Trust_News + (1|post:country) + (1 | ResponseId) , data=subset(corrections_accuracy_long))
summ(rq4a_all, digits=3, confint =T)

rq4a_uk <- lmer(accuracy ~ condition*Trust_News + post + (1 | ResponseId) , data=subset(corrections_accuracy_long, country=="UK"))
summ(rq4a_uk, digits=3, confint =T)

rq4a_brazil <- lmer(accuracy ~ condition*Trust_News + post + (1 | ResponseId), data=subset(corrections_accuracy_long, country=="Brazil"))
summ(rq4a_brazil, digits=3, confint =T)

rq4a_india <- lmer(accuracy ~ condition*Trust_News + post + (1 | ResponseId), data=subset(corrections_accuracy_long, country=="India"))
summ(rq4a_india, digits=3, confint =T)

```

### Plots

```{r rq4a_plots}
rq4a_uk_results <- ggpredict(rq4a_uk, terms = c("condition", "Trust_News"))
rq4a_india_results <- ggpredict(rq4a_india, terms = c("condition", "Trust_News"))
rq4a_brazil_results <- ggpredict(rq4a_brazil, terms = c("condition", "Trust_News"))


rq4a_uk_plot <- ggplot(rq4a_uk_results, aes(x, predicted, group=group)) +
   # geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
    ylab("accuracy") +
   #xlab("Condition") +
    ggtitle("UK") +
      scale_color_manual("Trust in news", 
                      values = c("#d7eefd", "#99c8ff", "#55a7ff", "#1f86ff", "#0d42ff"), 
                      labels = c("Not at all", "A little", "A moderate amount", "A lot", "A great deal"))+
    theme_classic() +
    theme(axis.title.x=element_blank())

rq4a_brazil_plot <- ggplot(rq4a_brazil_results, aes(x, predicted, group=group)) +
    #geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
    #ylab("sharing") +
    xlab("Condition") +
    ggtitle("Brazil") +
      scale_color_manual("Trust in news", 
                      values = c("#d7eefd", "#99c8ff", "#55a7ff", "#1f86ff", "#0d42ff"), 
                      labels = c("Not at all", "A little", "A moderate amount", "A lot", "A great deal"))+
    theme_classic() +
    theme(axis.title.y=element_blank(),
          axis.text.y=element_blank())

rq4a_india_plot <- ggplot(rq4a_india_results, aes(x, predicted, group=group)) +
   # geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
    ylab("accuracy") +
    xlab("Condition") +
    ggtitle("India") +
      scale_color_manual("Trust in news", 
                      values = c("#d7eefd", "#99c8ff", "#55a7ff", "#1f86ff", "#0d42ff"), 
                      labels = c("Not at all", "A little", "A moderate amount", "A lot", "A great deal"))+
    theme_classic() +
    theme(axis.title.y=element_blank(),
          axis.text.y=element_blank(),
          axis.title.x=element_blank())

final_plot <-rq4a_uk_plot + rq4a_brazil_plot + rq4a_india_plot + plot_layout(guides = 'collect')
print(final_plot)

ggsave("TrustAcc.pdf", final_plot, width = 7, height = 5)

```


## RQ4b
### Models
```{r rq4b}
# Is the effect of correction moderated by trust in Social Media?
rq4b_all <- lmer(sharing ~ condition*Trust_News + (1|post:country) + (1 | ResponseId) , data=subset(corrections_sharing_long))
summ(rq4b_all, digits=3, confint =T)

rq4b_uk <- lmer(sharing ~ condition*Trust_News + post + (1 | ResponseId) , data=subset(corrections_sharing_long, country=="UK"))
summ(rq4b_uk, digits=3, confint =T)

rq4b_brazil <- lmer(sharing ~ condition*Trust_News + post + (1 | ResponseId), data=subset(corrections_sharing_long, country=="Brazil"))
summ(rq4b_brazil, digits=3, confint =T)

rq4b_india <- lmer(sharing ~ condition*Trust_News + post + (1 | ResponseId), data=subset(corrections_sharing_long, country=="India"))
summ(rq4b_india, digits=3, confint =T)

```

### Plots

```{r rq4b_plots}
rq4b_uk_results <- ggpredict(rq4b_uk, terms = c("condition", "Trust_News"))
rq4b_india_results <- ggpredict(rq4b_india, terms = c("condition", "Trust_News"))
rq4b_brazil_results <- ggpredict(rq4b_brazil, terms = c("condition", "Trust_News"))

rq4b_uk_plot <- ggplot(rq4b_uk_results, aes(x, predicted, group=group)) +
    #geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n likely", "Not very\n likely", "Somewhat\n likely", "Very\n likely")) +
    ylab("Sharing") +
   #xlab("Condition") +
    ggtitle("UK") +
      scale_color_manual("Trust in news", 
                      values = c("#d7eefd", "#99c8ff", "#55a7ff", "#1f86ff", "#0d42ff"), 
                      labels = c("Not at all", "A little", "A moderate amount", "A lot", "A great deal"))+
    theme_classic() +
    theme(axis.title.x=element_blank())

rq4b_brazil_plot <- ggplot(rq4b_brazil_results, aes(x, predicted, group=group)) +
   # geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
    #ylab("sharing") +
    xlab("Condition") +
    ggtitle("Brazil") +
      scale_color_manual("Trust in news", 
                      values = c("#d7eefd", "#99c8ff", "#55a7ff", "#1f86ff", "#0d42ff"), 
                      labels = c("Not at all", "A little", "A moderate amount", "A lot", "A great deal"))+
    theme_classic() +
    theme(axis.title.y=element_blank(),
          axis.text.y=element_blank())

rq4b_india_plot <- ggplot(rq4b_india_results, aes(x, predicted, group=group)) +
    #geom_line(aes(color=group)) +
    geom_point(aes(color=group)) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high, color=group), width=.1) +
    scale_x_discrete(labels=c("Control","No link","Link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
    ylab("Sharing") +
    xlab("Condition") +
    ggtitle("India") +
      scale_color_manual("Trust in news", 
                      values = c("#d7eefd", "#99c8ff", "#55a7ff", "#1f86ff", "#0d42ff"), 
                      labels = c("Not at all", "A little", "A moderate amount", "A lot", "A great deal"))+
    theme_classic() +
    theme(axis.title.y=element_blank(),
          axis.text.y=element_blank(),
          axis.title.x=element_blank())

final_plot <-rq4b_uk_plot + rq4b_brazil_plot + rq4b_india_plot + plot_layout(guides = 'collect')
print(final_plot)

ggsave("TrustSha.pdf", final_plot, width = 7, height = 5)

```




## Descriptive: Mean & SDs across conditions

```{r M&SDs}
#Summary for Sharing:
# Control .92 (1.13)
# No link .87 (1.09)
# Link    .83 (1.09) 

#Summary for belief:
# Control 1.18 (1.08)
# No link 1.13 (1.09)
# Link    1.07 (1.07) 


table(corrections_accuracy_long$country, corrections_accuracy_long$condition)


mean_accuracy_by_condition_Country <- aggregate(accuracy ~ condition * country, corrections_accuracy_long, mean)
mean_accuracy_by_condition_Country

sd_accuracy_by_condition_Country <- aggregate(accuracy ~ condition * country, corrections_accuracy_long, sd)
sd_accuracy_by_condition_Country

mean_sharing_by_condition_Country <- aggregate(sharing ~ condition * country, corrections_sharing_long, mean)
mean_sharing_by_condition_Country

sd_sharing_by_condition_Country <- aggregate(sharing ~ condition * country, corrections_sharing_long, sd)
sd_sharing_by_condition_Country



       
corrections_merged <- corrections_merged %>%
  mutate(mean_accuracy = rowMeans(select(., false_1_accuracy:false_4_accuracy), na.rm = TRUE))

mean_accuracy_by_condition_Country <- aggregate(mean_accuracy ~ condition * country, corrections_merged, mean)
mean_accuracy_by_condition_Country

sd_accuracy_by_condition_Country <- aggregate(mean_accuracy ~ condition * country, corrections_merged, sd)
sd_accuracy_by_condition_Country

N_by_condition_Country <- aggregate(mean_accuracy ~ condition * country, corrections_merged, length)
N_by_condition_Country

```


## Quantifying floor effects

```{r floor}
# Summary: we have very clear floor effects in the UK, and some floor effects in Brazil too. But no problem in India. 

# Percentage of zeros
Uk_share = filter(corrections_sharing_long, country =="UK")
table(Uk_share$sharing)
2879/4000 #72%

Ind_share = filter(corrections_sharing_long, country =="India")
table(Ind_share$sharing)
1162/4000 # 29%

Bra_share = filter(corrections_sharing_long, country =="Brazil")
table(Bra_share$sharing)
2546/4000 #64%

Uk_belief = filter(corrections_accuracy_long, country =="UK")
table(Uk_belief$accuracy)
1885/4000 #47%

Ind_belief = filter(corrections_accuracy_long, country =="India")
table(Ind_belief$accuracy)
1013/4000 #25%
  
Bra_belief = filter(corrections_accuracy_long, country =="Brazil")
table(Bra_belief$accuracy)
1723/4000 #43%

# Percentage of zeros in the control condition
Uk_share = filter(corrections_sharing_long, country =="UK" & condition =="control")
table(Uk_share$sharing)
963/1348 #71%

Ind_share = filter(corrections_sharing_long, country =="India"& condition =="control")
table(Ind_share$sharing)
347/1320 # 26%

Bra_share = filter(corrections_sharing_long, country =="Brazil"& condition =="control")
table(Bra_share$sharing)
793/1304 #61%

Uk_belief = filter(corrections_accuracy_long, country =="UK"& condition =="control")
table(Uk_belief$accuracy)
604/1348 #45%

Ind_belief = filter(corrections_accuracy_long, country =="India"& condition =="control")
table(Ind_belief$accuracy)
294/1320 #22%
  
Bra_belief = filter(corrections_accuracy_long, country =="Brazil"& condition =="control")
table(Bra_belief$accuracy)
514/1304 #39%

```



## Individual posts UK - Accuracy
### Models

```{r hUK_K}

Post_1_UK <- lm(accuracy ~ condition, data=subset(corrections_accuracy_long, country=="UK"& post=="false_1_accuracy"))
summ(Post_1_UK)

Post_2_UK <- lm(accuracy ~ condition, data=subset(corrections_accuracy_long, country=="UK"& post=="false_2_accuracy"))
summ(Post_2_UK)

Post_3_UK <- lm(accuracy ~ condition, data=subset(corrections_accuracy_long, country=="UK"& post=="false_3_accuracy"))
summ(Post_3_UK)

Post_4_UK <- lm(accuracy ~ condition, data=subset(corrections_accuracy_long, country=="UK"& post=="false_4_accuracy"))
summ(Post_4_UK)

```

### Plots

```{r h1a_plotsUKUK}
Post_1_UK_ <- ggpredict(Post_1_UK, terms = c("condition"))
Post_2_UK_ <- ggpredict(Post_2_UK, terms = c("condition"))
Post_3_UK_ <- ggpredict(Post_3_UK, terms = c("condition"))
Post_4_UK_ <- ggpredict(Post_4_UK, terms = c("condition"))

Post_1_UK_plot <- ggplot(Post_1_UK_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("UK_Post_1") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_2_UK_plot <- ggplot(Post_2_UK_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("UK_Post_2") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_3_UK_plot <- ggplot(Post_3_UK_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("UK_Post_3") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_4_UK_plot <- ggplot(Post_4_UK_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("UK_Post_4") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_1_UK_plot + Post_2_UK_plot + Post_3_UK_plot + Post_4_UK_plot

```


## Individual posts Brazil - Accuracy
### Models

```{r hBRAIZL}

Post_1_Bra <- lm(accuracy ~ condition, data=subset(corrections_accuracy_long, country=="Brazil"& post=="false_1_accuracy"))
summ(Post_1_Bra)

Post_2_Bra <- lm(accuracy ~ condition, data=subset(corrections_accuracy_long, country=="Brazil"& post=="false_2_accuracy"))
summ(Post_2_Bra)

Post_3_Bra <- lm(accuracy ~ condition, data=subset(corrections_accuracy_long, country=="Brazil"& post=="false_3_accuracy"))
summ(Post_3_Bra)

Post_4_Bra <- lm(accuracy ~ condition, data=subset(corrections_accuracy_long, country=="Brazil"& post=="false_4_accuracy"))
summ(Post_4_Bra)

```

### Plots

```{r h1a_plots-BRAIJ}
Post_1_Bra_ <- ggpredict(Post_1_Bra, terms = c("condition"))
Post_2_Bra_ <- ggpredict(Post_2_Bra, terms = c("condition"))
Post_3_Bra_ <- ggpredict(Post_3_Bra, terms = c("condition"))
Post_4_Bra_ <- ggpredict(Post_4_Bra, terms = c("condition"))

Post_1_Bra_plot <- ggplot(Post_1_Bra_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("Bra_Post_1") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_2_Bra_plot <- ggplot(Post_2_Bra_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("Bra_Post_2") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_3_Bra_plot <- ggplot(Post_3_Bra_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("Bra_Post_3") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_4_Bra_plot <- ggplot(Post_4_Bra_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("Bra_Post_4") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_1_Bra_plot + Post_2_Bra_plot + Post_3_Bra_plot + Post_4_Bra_plot

```


## Individual posts India - Accuracy
### Models

```{r hINDIA}

Post_1_India <- lm(accuracy ~ condition, data=subset(corrections_accuracy_long, country=="India"& post=="false_1_accuracy"))
summ(Post_1_India)

Post_2_India <- lm(accuracy ~ condition, data=subset(corrections_accuracy_long, country=="India"& post=="false_2_accuracy"))
summ(Post_2_India)

Post_3_India <- lm(accuracy ~ condition, data=subset(corrections_accuracy_long, country=="India"& post=="false_3_accuracy"))
summ(Post_3_India)

Post_4_India <- lm(accuracy ~ condition, data=subset(corrections_accuracy_long, country=="India"& post=="false_4_accuracy"))
summ(Post_4_India)

```

### Plots

```{r h1a_plots-INDIA}
Post_1_India_ <- ggpredict(Post_1_India, terms = c("condition"))
Post_2_India_ <- ggpredict(Post_2_India, terms = c("condition"))
Post_3_India_ <- ggpredict(Post_3_India, terms = c("condition"))
Post_4_India_ <- ggpredict(Post_4_India, terms = c("condition"))

Post_1_India_plot <- ggplot(Post_1_India_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("India_Post_1") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_2_India_plot <- ggplot(Post_2_India_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("India_Post_2") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_3_India_plot <- ggplot(Post_3_India_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("India_Post_3") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_4_India_plot <- ggplot(Post_4_India_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("India_Post_4") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_1_India_plot + Post_2_India_plot + Post_3_India_plot + Post_4_India_plot

```




## Individual posts UK - Sharing
### Models

```{r hUK_Ksharing}

Post_1_UK <- lm(sharing ~ condition, data=subset(corrections_sharing_long, country=="UK"& post=="false_1_sharing"))
summ(Post_1_UK)

Post_2_UK <- lm(sharing ~ condition, data=subset(corrections_sharing_long, country=="UK"& post=="false_2_sharing"))
summ(Post_2_UK)

Post_3_UK <- lm(sharing ~ condition, data=subset(corrections_sharing_long, country=="UK"& post=="false_3_sharing"))
summ(Post_3_UK)

Post_4_UK <- lm(sharing ~ condition, data=subset(corrections_sharing_long, country=="UK"& post=="false_4_sharing"))
summ(Post_4_UK)

```

### Plots

```{r h1a_plotsUKUKsharing}
Post_1_UK_ <- ggpredict(Post_1_UK, terms = c("condition"))
Post_2_UK_ <- ggpredict(Post_2_UK, terms = c("condition"))
Post_3_UK_ <- ggpredict(Post_3_UK, terms = c("condition"))
Post_4_UK_ <- ggpredict(Post_4_UK, terms = c("condition"))

Post_1_UK_plot <- ggplot(Post_1_UK_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved sharing") +
  xlab("Condition") +
  ggtitle("UK_Post_1") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_2_UK_plot <- ggplot(Post_2_UK_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved sharing") +
  xlab("Condition") +
  ggtitle("UK_Post_2") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_3_UK_plot <- ggplot(Post_3_UK_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved sharing") +
  xlab("Condition") +
  ggtitle("UK_Post_3") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_4_UK_plot <- ggplot(Post_4_UK_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved sharing") +
  xlab("Condition") +
  ggtitle("UK_Post_4") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_1_UK_plot + Post_2_UK_plot + Post_3_UK_plot + Post_4_UK_plot

```


## Individual posts Brazil - Sharing
### Models

```{r hBRAIZLsharing}

Post_1_Bra <- lm(sharing ~ condition, data=subset(corrections_sharing_long, country=="Brazil"& post=="false_1_sharing"))
summ(Post_1_Bra)

Post_2_Bra <- lm(sharing ~ condition, data=subset(corrections_sharing_long, country=="Brazil"& post=="false_2_sharing"))
summ(Post_2_Bra)

Post_3_Bra <- lm(sharing ~ condition, data=subset(corrections_sharing_long, country=="Brazil"& post=="false_3_sharing"))
summ(Post_3_Bra)

Post_4_Bra <- lm(sharing ~ condition, data=subset(corrections_sharing_long, country=="Brazil"& post=="false_4_sharing"))
summ(Post_4_Bra)

```

### Plots

```{r h1a_plots-BRAIJsharing}
Post_1_Bra_ <- ggpredict(Post_1_Bra, terms = c("condition"))
Post_2_Bra_ <- ggpredict(Post_2_Bra, terms = c("condition"))
Post_3_Bra_ <- ggpredict(Post_3_Bra, terms = c("condition"))
Post_4_Bra_ <- ggpredict(Post_4_Bra, terms = c("condition"))

Post_1_Bra_plot <- ggplot(Post_1_Bra_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved sharing") +
  xlab("Condition") +
  ggtitle("Bra_Post_1") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_2_Bra_plot <- ggplot(Post_2_Bra_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved sharing") +
  xlab("Condition") +
  ggtitle("Bra_Post_2") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_3_Bra_plot <- ggplot(Post_3_Bra_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved sharing") +
  xlab("Condition") +
  ggtitle("Bra_Post_3") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_4_Bra_plot <- ggplot(Post_4_Bra_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved sharing") +
  xlab("Condition") +
  ggtitle("Bra_Post_4") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_1_Bra_plot + Post_2_Bra_plot + Post_3_Bra_plot + Post_4_Bra_plot

```


## Individual posts India - Sharing
### Models

```{r hINDIAsharing}

Post_1_India <- lm(sharing ~ condition, data=subset(corrections_sharing_long, country=="India"& post=="false_1_sharing"))
summ(Post_1_India)

Post_2_India <- lm(sharing ~ condition, data=subset(corrections_sharing_long, country=="India"& post=="false_2_sharing"))
summ(Post_2_India)

Post_3_India <- lm(sharing ~ condition, data=subset(corrections_sharing_long, country=="India"& post=="false_3_sharing"))
summ(Post_3_India)

Post_4_India <- lm(sharing ~ condition, data=subset(corrections_sharing_long, country=="India"& post=="false_4_sharing"))
summ(Post_4_India)

```

### Plots

```{r h1a_plots-INDIAsharing}
Post_1_India_ <- ggpredict(Post_1_India, terms = c("condition"))
Post_2_India_ <- ggpredict(Post_2_India, terms = c("condition"))
Post_3_India_ <- ggpredict(Post_3_India, terms = c("condition"))
Post_4_India_ <- ggpredict(Post_4_India, terms = c("condition"))

Post_1_India_plot <- ggplot(Post_1_India_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved sharing") +
  xlab("Condition") +
  ggtitle("India_Post_1") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_2_India_plot <- ggplot(Post_2_India_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved sharing") +
  xlab("Condition") +
  ggtitle("India_Post_2") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_3_India_plot <- ggplot(Post_3_India_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved sharing") +
  xlab("Condition") +
  ggtitle("India_Post_3") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_4_India_plot <- ggplot(Post_4_India_, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved sharing") +
  xlab("Condition") +
  ggtitle("India_Post_4") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

Post_1_India_plot + Post_2_India_plot + Post_3_India_plot + Post_4_India_plot

```






## Determinants of belief  

```{r explo}
corrections_accuracy_long_ALL <- melt(corrections_merged, id.vars = c("ResponseId", "condition", "country", "consp_mean","Trust_SM","Trust_News","Trust_Scientist","Trust_Ordinary_ppl","age","gender","education"), 
              measure.vars = c("false_1_accuracy", "false_2_accuracy", "false_3_accuracy", "false_4_accuracy","uncorrected_1_accuracy", "uncorrected_2_accuracy"), 
              variable.name = "post", 
              value.name="accuracy")

Explo_3 <- lmer(accuracy ~ consp_mean  + Trust_SM + Trust_News +Trust_Scientist+Trust_Ordinary_ppl+age+gender +education+ condition + (1|post:country)+(1 | ResponseId), data=corrections_accuracy_long_ALL) 
summ(Explo_3)

Explo_3_UK <- lmer(accuracy ~ consp_mean  + Trust_SM + Trust_News +Trust_Scientist+Trust_Ordinary_ppl+age+gender +education+ condition +(1 | ResponseId)+ (1 | post), data=subset(corrections_accuracy_long_ALL, country=="UK"))
summ(Explo_3_UK) 

Explo_3_BRA <- lmer(accuracy ~ consp_mean  + Trust_SM + Trust_News +Trust_Scientist+Trust_Ordinary_ppl+age+gender +education+ condition +(1 | ResponseId)+ (1 | post), data=subset(corrections_accuracy_long_ALL, country=="Brazil"))
summ(Explo_3_BRA) 

Explo_3_IND <- lmer(accuracy ~ consp_mean  + Trust_SM + Trust_News +Trust_Scientist+Trust_Ordinary_ppl+age+gender +education+ condition +(1 | ResponseId)+ (1 | post), data=subset(corrections_accuracy_long_ALL, country=="India"))
summ(Explo_3_IND) 
```


## Determinants of sharing 

```{r explosha}
corrections_sharing_long_ALL <- melt(corrections_merged, id.vars = c("ResponseId", "condition", "country", "consp_mean","Trust_SM","Trust_News","Trust_Scientist","Trust_Ordinary_ppl","age","gender","education"), 
              measure.vars = c("false_1_sharing", "false_2_sharing", "false_3_sharing", "false_4_sharing","uncorrected_1_sharing", "uncorrected_2_sharing"), 
              variable.name = "post", 
              value.name="sharing")

Explo_4 <- lmer(sharing ~ consp_mean  + Trust_SM + Trust_News +Trust_Scientist+Trust_Ordinary_ppl+age+gender +education + condition + (1|post:country)+(1 | ResponseId), data=corrections_sharing_long_ALL)
summ(Explo_4)

Explo_4_UK <- lmer(sharing ~ consp_mean  + Trust_SM + Trust_News +Trust_Scientist+Trust_Ordinary_ppl+age+gender +education+ condition +(1 | ResponseId)+ (1 | post), data=subset(corrections_sharing_long_ALL, country=="UK"))
summ(Explo_4_UK) 

Explo_4_BRA <- lmer(sharing ~ consp_mean  + Trust_SM + Trust_News +Trust_Scientist+Trust_Ordinary_ppl+age+gender +education+ condition +(1 | ResponseId)+ (1 | post), data=subset(corrections_sharing_long_ALL, country=="Brazil"))
summ(Explo_4_BRA) 

Explo_4_IND <- lmer(sharing ~ consp_mean  + Trust_SM + Trust_News +Trust_Scientist+Trust_Ordinary_ppl+age+gender +education+ condition +(1 | ResponseId)+ (1 | post), data=subset(corrections_sharing_long_ALL, country=="India"))
summ(Explo_4_IND) 
```

## Spillover effect on uncorrected FALSE posts - Accuracy 
### Models

```{r h1a_modelspli}
corrections_accuracy_long_uncorrected <- melt(corrections_merged, id.vars = c("ResponseId", "condition", "country", "consp_mean","Trust_SM","Trust_News","Trust_Scientist","Trust_Ordinary_ppl","age","gender","education"), 
              measure.vars = c("uncorrected_1_accuracy", "uncorrected_2_accuracy"), 
              variable.name = "post", 
              value.name="accuracy")

h1a_all <- lmer(accuracy ~ condition +(1|post:country)+ (1 | ResponseId), data=corrections_accuracy_long_uncorrected)
summ(h1a_all)

coefs <- fixef(h1a_all)
percent_increase <- (coefs / coefs[1] - 1) * 100
percent_increase

coefs <- fixef(h1a_all)
pp_effects <- (coefs / 3) * 100
pp_effects


h1a_uk <- lmer(accuracy ~ condition + post + (1 | ResponseId), data=subset(corrections_accuracy_long_uncorrected, country=="UK"))
summ(h1a_uk)

h1a_brazil <- lmer(accuracy ~ condition +  post+(1 | ResponseId), data=subset(corrections_accuracy_long_uncorrected, country=="Brazil"))
summ(h1a_brazil)

h1a_india <- lmer(accuracy ~ condition + post + (1 | ResponseId), data=subset(corrections_accuracy_long_uncorrected, country=="India"))
summ(h1a_india)

```

### Plots

```{r h1a_resultsspsli}
h1a_uk_results <- ggpredict(h1a_uk, terms = c("condition"))
h1a_brazil_results <- ggpredict(h1a_brazil, terms = c("condition"))
h1a_india_results <- ggpredict(h1a_india, terms = c("condition"))
```

```{r h1a_plotsdpsalaiiid}
h1a_uk_plot <- ggplot(h1a_uk_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("UK - uncorrected posts") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

h1a_brazil_plot <- ggplot(h1a_brazil_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
  scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
  scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
  ylab("Accuracy") +
  xlab("Condition") +
  ggtitle("Brazil - uncorrected posts") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.y=element_blank(),
        axis.text.y=element_blank(),
        legend.position = "none")

h1a_india_plot <- ggplot(h1a_india_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
  scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
  scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
  ylab("Accuracy") +
  xlab("Condition") +
  ggtitle("India - uncorrected posts") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.y=element_blank(),
        axis.text.y=element_blank(),
        axis.title.x=element_blank(),
        legend.position = "none")




```


## Spillover effect on TRUE posts - Accuracy 
### Models

```{r h1a_modelspliza}
corrections_accuracy_long_real <- melt(corrections_merged, id.vars = c("ResponseId", "condition", "country", "consp_mean","Trust_SM","Trust_News","Trust_Scientist","Trust_Ordinary_ppl","age","gender","education"), 
               measure.vars = c("real_1_accuracy", "real_2_accuracy","real_3_accuracy"), 
               variable.name = "post", 
               value.name="accuracy")

h1a_all <- lmer(accuracy ~ condition + (1|post:country) + (1 | ResponseId), data=corrections_accuracy_long_real)
summ(h1a_all)

coefs <- fixef(h1a_all)
percent_increase <- (coefs / coefs[1] - 1) * 100
percent_increase

coefs <- fixef(h1a_all)
pp_effects <- (coefs / 3) * 100
pp_effects

h1a_uk <- lmer(accuracy ~ condition + post + (1 | ResponseId), data=subset(corrections_accuracy_long_real, country=="UK"))
summ(h1a_uk)

h1a_brazil <- lmer(accuracy ~ condition +  post+(1 | ResponseId), data=subset(corrections_accuracy_long_real, country=="Brazil"))
summ(h1a_brazil)

h1a_india <- lmer(accuracy ~ condition + post + (1 | ResponseId), data=subset(corrections_accuracy_long_real, country=="India"))
summ(h1a_india)

```

### Plots

```{r h1a_resultsspsliza}
h1a_uk_results <- ggpredict(h1a_uk, terms = c("condition"))
h1a_brazil_results <- ggpredict(h1a_brazil, terms = c("condition"))
h1a_india_results <- ggpredict(h1a_india, terms = c("condition"))
```

```{r h1a_plotsdpsalad}
h1a_uk_plot <- ggplot(h1a_uk_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n accurate", "Not very\n accurate", "Somewhat\n accurate", "Very\n accurate")) +
  ylab("Percieved accuracy") +
  xlab("Condition") +
  ggtitle("UK - true posts") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

h1a_brazil_plot <- ggplot(h1a_brazil_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
  scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
  scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
  ylab("Accuracy") +
  xlab("Condition") +
  ggtitle("Brazil - true posts") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.y=element_blank(),
        axis.text.y=element_blank(),
        legend.position = "none")

h1a_india_plot <- ggplot(h1a_india_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
  scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
  scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
  ylab("Accuracy") +
  xlab("Condition") +
  ggtitle("India - true posts") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.y=element_blank(),
        axis.text.y=element_blank(),
        axis.title.x=element_blank(),
        legend.position = "none")


```


## Spillover effect on uncorrected FALSE posts - Sharing 
### Models

```{r h1a_modelspliazazaaa}
corrections_sharing_long_uncorrected <- melt(corrections_merged, id.vars = c("ResponseId", "condition", "country", "consp_mean","Trust_SM","Trust_News","Trust_Scientist","Trust_Ordinary_ppl","age","gender","education"), 
              measure.vars = c("uncorrected_1_sharing", "uncorrected_2_sharing"), 
              variable.name = "post", 
              value.name="sharing")

h1a_all <- lmer(sharing ~ condition + (1|post:country)+ (1 | ResponseId), data=corrections_sharing_long_uncorrected)
summ(h1a_all)

coefs <- fixef(h1a_all)
percent_increase <- (coefs / coefs[1] - 1) * 100
percent_increase

coefs <- fixef(h1a_all)
pp_effects <- (coefs / 3) * 100
pp_effects


h1a_uk <- lmer(sharing ~ condition + post + (1 | ResponseId), data=subset(corrections_sharing_long_uncorrected, country=="UK"))
summ(h1a_uk)

h1a_brazil <- lmer(sharing ~ condition +  post+(1 | ResponseId), data=subset(corrections_sharing_long_uncorrected, country=="Brazil"))
summ(h1a_brazil)

h1a_india <- lmer(sharing ~ condition + post + (1 | ResponseId), data=subset(corrections_sharing_long_uncorrected, country=="India"))
summ(h1a_india)

```

### Plots

```{r h1a_resultsspsladsadzdai}
h1a_uk_results <- ggpredict(h1a_uk, terms = c("condition"))
h1a_brazil_results <- ggpredict(h1a_brazil, terms = c("condition"))
h1a_india_results <- ggpredict(h1a_india, terms = c("condition"))
```

```{r h1a_plotsdpsalaoood}
h1a_uk_plot <- ggplot(h1a_uk_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n likely", "Not very\n likely", "Somewhat\n likely", "Very\n likely")) +
  ylab("Likelihood of sharing") +
  xlab("Condition") +
  ggtitle("UK - uncorrected false posts") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

h1a_brazil_plot <- ggplot(h1a_brazil_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
  scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
  scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
  ylab("Likelihood of sharing") +
  xlab("Condition") +
  ggtitle("Brazil - uncorrected false posts") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.y=element_blank(),
        axis.text.y=element_blank(),
        legend.position = "none")

h1a_india_plot <- ggplot(h1a_india_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
  scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
  scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
  ylab("Likelihood of sharing") +
  xlab("Condition") +
  ggtitle("India - uncorrected false posts") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.y=element_blank(),
        axis.text.y=element_blank(),
        axis.title.x=element_blank(),
        legend.position = "none")


```


## Spillover effect on TRUE post - Sharing 
### Models

```{r h1a_modelspliazazaaaaaa}
corrections_sharing_long_uncorrected <- melt(corrections_merged, id.vars = c("ResponseId", "condition", "country", "consp_mean","Trust_SM","Trust_News","Trust_Scientist","Trust_Ordinary_ppl","age","gender","education"), 
              measure.vars = c("real_1_sharing", "real_2_sharing","real_3_sharing"), 
              variable.name = "post", 
              value.name="sharing")

h1a_all <- lmer(sharing ~ condition + (1|post:country) + (1 | ResponseId), data=corrections_sharing_long_uncorrected)
summ(h1a_all)

coefs <- fixef(h1a_all)
percent_increase <- (coefs / coefs[1] - 1) * 100
percent_increase

coefs <- fixef(h1a_all)
pp_effects <- (coefs / 3) * 100
pp_effects


h1a_uk <- lmer(sharing ~ condition + post + (1 | ResponseId), data=subset(corrections_sharing_long_uncorrected, country=="UK"))
summ(h1a_uk)

h1a_brazil <- lmer(sharing ~ condition +  post+(1 | ResponseId), data=subset(corrections_sharing_long_uncorrected, country=="Brazil"))
summ(h1a_brazil)

h1a_india <- lmer(sharing ~ condition + post + (1 | ResponseId), data=subset(corrections_sharing_long_uncorrected, country=="India"))
summ(h1a_india)

```

### Plots

```{r h1a_resultsspsladsadzdaiii}
h1a_uk_results <- ggpredict(h1a_uk, terms = c("condition"))
h1a_brazil_results <- ggpredict(h1a_brazil, terms = c("condition"))
h1a_india_results <- ggpredict(h1a_india, terms = c("condition"))
```

```{r h1a_plotsdpsaladppp}
h1a_uk_plot <- ggplot(h1a_uk_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
    scale_y_continuous(limits = c(0,3), expand = c(0,0), labels=c("Not at all\n likely", "Not very\n likely", "Somewhat\n likely", "Very\n likely")) +
  ylab("Likelihood of sharing") +
  xlab("Condition") +
  ggtitle("UK - true posts") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.x=element_blank(),
        legend.position = "none")

h1a_brazil_plot <- ggplot(h1a_brazil_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
  scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
  scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
  ylab("Likelihood of sharing") +
  xlab("Condition") +
  ggtitle("Brazil - true posts") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.y=element_blank(),
        axis.text.y=element_blank(),
        legend.position = "none")

h1a_india_plot <- ggplot(h1a_india_results, aes(x, predicted, fill=x)) +
  geom_bar(stat="identity") +
  geom_errorbar(aes(ymin=conf.low, ymax=conf.high), width=.2, position=position_dodge(.9)) +
  scale_x_discrete(labels=c("Control","Correction\n no link","Correction\n inc. link")) +
  scale_y_continuous(limits = c(0,3), expand = c(0,0)) +
  ylab("Likelihood of sharing") +
  xlab("Condition") +
  ggtitle("India - true posts") +
  scale_fill_manual(values=c("#b6bdc9", "#01b2be", "#82135f")) +
  theme_classic() +
  theme(axis.title.y=element_blank(),
        axis.text.y=element_blank(),
        axis.title.x=element_blank(),
        legend.position = "none")



```

